import { BusStrategy, TaxiStrategy, SharedBicycleStrategy } from "./Strategy";
import Context from "./Context";

// 先实例化几种策略
const busStrategy = new BusStrategy();
const taxiStrategy = new TaxiStrategy();
const sharedBicycleStrategy = new SharedBicycleStrategy();

// 创建上下文，指定默认的策略
const context = new Context(busStrategy);
console.log(context.goToAirport(10)); // 6